package top.zlcode.friend.domain.user;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Getter;
import lombok.Setter;
import top.zlcode.common.core.domain.BaseEntity;

/**
 * 用户报名竞赛表实体
 */
@Getter
@Setter
@TableName("tb_user_exam")
public class UserExam extends BaseEntity {

    /**
     * 用户竞赛关系id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "user_exam_id", type = IdType.ASSIGN_ID)
    private Long userExamId;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 竞赛id
     */
    private Long examId;

    /**
     * 得分
     */
    private Integer score;

    /**
     * 排名
     */
    private Integer examRank;

}
